<?php
/*********************************************************
author			Henson
date			2011-3-30
function		www.87dianping.com 配置文件
*********************************************************/

error_reporting(0);
//ini_set("display_errors","On");
//error_reporting(E_ALL);
date_default_timezone_set('Asia/Shanghai');
define( "_ROOT" , dirname(__FILE__) );
define( "_HOST_ROOT", "http://www.87dianping.com");
define( "_INC_PATH", _ROOT."/include/");
define( "_IMG_PATH", _ROOT."/images/");
define( "_CORPORATION_PATH", _ROOT."/corporation/");
define( "_CATEGORY_PATH", _ROOT."/category/");
define( "_TECH_PATH", _ROOT."/tech/");

//系统定义变量
require_once(_INC_PATH."define.php");

//load function
include_once(_INC_PATH."fun.php");

//smarty class
include_once(_INC_PATH."smarty/Smarty.class.php");		//TPL class
$smarty = new smarty;		//new class

//server
$smarty->template_dir = _ROOT.'/template';
$smarty->compile_dir = _ROOT.'/template_c';
$smarty->left_delimiter = '{{';
$smarty->right_delimiter = '}}';

//预输出
$smarty->assign("host_root",_HOST_ROOT);
if(checkIsLogin()){
	$smarty->assign("isLogin",'1');
}else{
	$smarty->assign("isLogin",'0');
}

//mysql 数据库
$con = '1';
if($con == '1'){
	define( "_DB_HOST" , "localhost" );
	define( "_DB_USER" , "root" );
	define( "_DB_PASS" , "root" );
	define( "_DB_NAME" , "87dianping" );
}


include_once(_INC_PATH."/global.php");
include_once("error.inc");

?>